Reference


The Apple menu

About Big Brother...

Big Brother's About box gives you easy access to my electronic addresses. Click on an address to select it. Once it is selected, you can copy it to the Clipboard using the Edit menu, double-click it to open it using the appropriate application (this requires Internet Config 1.1 or later), or drag it to the Finder or to a text editor (this requires System 7.5 or later).

This is supposed to make it easier for you to contact me. I'm awaiting your feedback!

Help...

The Help... menu command launches your preferred browser and asks it to display the documentation. This command is also available under the Help menu at the right side of the menu bar. It requires Internet Config 1.1 or later.

Register Online...

This command uses your preferred browser to connect to Kagi Shareware's Web site and display a secure registration form. This is the quickest way to register if you have a credit card. This command requires Internet Config 1.1 or later.

Register Offline...

This command launches the Register application which is bundled with Big Brother. This application lets you fill a registration form which you can then mail, email or fax to Kagi Shareware. Here are detailed registration instructions.


The File menu

Open

When you select this menu item, a selection dialog appears. Choose the file or folder you wish to check. Big Brother shows only files which appear to be HTML source files. A file is shown if its name ends with .html or .htm, or if its internal Macintosh file type is 'HTML' or 'TEXT'.

You can also drop files or folders onto Big Brother's icon rather than using the Open menu command.

Once you have found the right file or folder, click OK. Big Brother starts scanning the file(s) for links, checks each of them, and displays the results in a new window. For each link, a diagnostic is displayed. If the link is valid, its diagnostic is printed in black; otherwise, an error diagnostic is displayed in a different color.

If the link has a name, it is displayed in the first column (the name is the text contained between the <A> and </A> tags). Otherwise, the link type is displayed in italics.

In the upper left corner of the window, Big Brother displays the current number of open network connections. Below, it indicates how many links have been checked, how many succeeded and how many failed. Also, as long as the check is running, a button labeled "Abort" is available. Clicking it stops the checks.

Multiple series of checks can be started simultaneously by using the Open command several times or by dropping several files or folders onto Big Brother's icon. The only limitation is the available memory.

Open Location

The Open command, described above, lets you open a file located on your hard disk. Open Location, on the other hand, lets you open any URL. This lets you fetch a file off a remote Web server and check it.

Quick Open

If you find yourself checking the same files or URLs often, add them to the Quick Open menu, using the Quick Open section of the Settings dialog. This allows you to bypass Open or Open Location.

Another way of automating actions is to use scripts.

Close

This command closes the frontmost window. If any checks are still in progress within this window, they are aborted.

Save As HTML

This command lets you save the contents of a window in HTML format. This allows you to browse the results of a check using a World Wide Web browser, rather than Big Brother itself. You will need a browser which supports tables.

For each document checked, the report displays name, diagnostic, URL and source, like Big Brother's windows. The name is hot-linked to the document's logical address (that is, before mappings were applied). The URL is hot-linked to the document's real address (that is, after mappings were applied), if it differs.

To choose which browser should be launched when the saved document is double-clicked, go to the Miscellaneous section of the Settings dialog.

Because many (if not all) existing browsers have trouble handling large files, Big Brother will automatically segment the report into several files whenever necessary.

Quit

This command quits Big Brother. Any checks in progress are aborted.


Settings

The Settings dialog appears when you choose the Settings command from the Edit menu. It is made up of several panels. You can navigate between panels using the popup menu at the top of the dialog.

Balloon Help can be turned on or off by clicking the icon located in the top right corner of the dialog.

When you're done editing settings, click OK to confirm your changes or Cancel to discard them. The button at the lower left corner allows you to save all settings to a text file. You can do this when reporting a bug; it might help me trace it.

Proxy

If your Mac lives behind a firewall which isolates it from the outside world, you might need to use a proxy. A proxy is a gateway machine which sits behind your Mac and the rest of the network and relays your Mac's HTTP requests.

If you don't know whether you need a proxy, ask your nearby guru. Having a look at your browser's settings might also help. If you find you need to use a proxy, check the first box and enter the proxy's name. For instance, my proxy's name is www-rocq.inria.fr. If your proxy uses a custom port number, you must add a colon followed by the port number to the server name, e.g. www-rocq.inria.fr:80.

You usually don't need to use the proxy when connecting to a machine within the same domain as yours, because it is also behind the firewall. If that is the case, check the second box and enter your domain's name. For instance, my domain is inria.fr.

If you have installed Internet Config 1.3 or later, you can tell Big Brother to automatically follow Internet Config's proxy settings. The above controls become ineffective and Big Brother then mirrors Internet Config's settings, even when you change them. This allows you to use Internet Config as the one centralized place to set your Internet preferences.

Link check options

This panel contains buttons which let you affect the way Big Brother verifies World Wide Web links.

Links are divided into two categories: remote and local links. The former can only be accessed by establishing a connection to a remote machine, while the latter represent files or folders on your hard disk. Checking local links is usually much faster and does not require your Mac to have networking capabilities. You can choose to ignore remote links (say, because you do not want to use your modem) or to ignore local links (say, because remote links are more likely to become invalid as time passes).

Next comes a panel which displays a list of mappings. Below it are three buttons which let you add, modify or delete mappings. A mapping is a way of telling Big Brother that a certain address really represents a certain folder on your hard disk. It consists of a source URL and a destination URL. While checking links, whenever the beginning of the address being checked matches a mapping's source URL, it is replaced with the mapping's destination URL.

For instance, my home page address is http://pauillac.inria.fr/~fpottier/. The source files for it are stored on my hard disk, in a folder whose URL is file:///Hal/Home%20Page/. So, I define a mapping with these two URLs. Note that I don't need to type the destination URL by hand, because the "Set..." button lets me select a folder and creates the URL for it automatically.

Thanks to this mapping, any link to one of my pages will be checked by looking up the contents of the disk, rather than by establishing a connection with the server pauillac.inria.fr. For instance, http://pauillac.inria.fr/~fpottier/mac-soft.html.en is mapped to file:///Hal/Home%20Page/mac-soft.html.en, and checking whether the file exists on the hard disk is enough.

You can now define any number of mappings.

I advise you to read my Tips on the proper use of mappings. They explain the most common situations and should help you avoid a few pitfalls.

Local configuration

This panel lets you change the way Big Brother checks local links.

The first field lets you define the default index file name. Whenever a local link points to a directory, Big Brother looks for an index file inside it. If recursion is on, and if this file matches the recursion regexp, then it shall be opened and checked. The default name for index files is "index.html", but a few variants exist. This setting affects local links only, because replacing a directory with its index file will be done transparently by the http server for remote links.

The second field lets you define which local files are HTML files, depending on their name, using a regular expression. When Big Brother finds a link to a local file, it must check whether the file is an HTML file before trying to analyze it recursively. Indeed, it would make no sense to try analyzing, say, an image file. So, the file name is matched against this regular expression, and if the match is successful, the file is assumed to contain HTML text. A common value for this setting is \.html$, which represents all files whose name ends with dot html. This affects local links only, because the http server gives this information to Big Brother for remote files.

The second field also affects which files are shown in the Open... dialog.

The check box at the bottom of this panel lets you choose whether case should matter when checking local links. If your Web server is Unix-based, it is likely to be case sensitive and you should turn this option on. Some Mac-based servers don't care about case; if you use such a server, you can leave this option off.

Recursion

When recursion is off, Big Brother reads the document you specify (which can be a local file or a remote document fetched off a server), verifies the links in it, and stops.

When recursion is on, Big Brother not only checks each link, but also determines whether it points to an HTML document. If it does, Big Brother fetches the document (which can also be local or remote), checks the links it contains, fetches the documents they point to, and so on, recursively.

Of course, this process has to stop at some point, otherwise you are likely to check all of Internet! So, when recursion is on, you must provide a regular expression to tell Big Brother which documents are yours.

Here's how it works: every time Big Brother finds a link, it matches its address against the regular expression you provide. If the match is successful, Big Brother fetches the document and checks it recursively; otherwise, it checks the links but doesn't follow it. So, the regular expression should describe exactly the documents you have control over.

For instance, my home page's address is http://pauillac.inria.fr/~fpottier/. I want Big Brother to check documents recursively as long as their are part of my page. So, I use the following regular expression:

^http://pauillac\.inria\.fr/~fpottier/

Since the expression doesn't end with a $ sign, it matches all addresses which start with http://pauillac.inria.fr/~fpottier/. Notice that I had to insert a backslash character in front of each dot, because otherwise a dot matches any character.

Here is another example: suppose I maintain several Web servers, but all of them are within the domain orange.com. Then, I can use the following regexp:

^http://.*\.orange\.com/

This will match the address of any document located on any server within the domain orange.com.

Note that the address is checked against the recursion regexp after the mappings have been applied to the address. So, if you are using mappings (say, to map a remote site to a certain folder of your hard disk), the recursion regexp should describe the local files' addresses, not the remote ones'. For instance, using ^file: as recursion regexp simply allows recursion on all local files.

Quick Open

This section lets you customize the contents of the Quick Open sub-menu. Each line of this menu corresponds to either an address, or a file or folder. In the first case, selecting this line has the same effect as using Open Location on this address. In the second case, it has the same effect as using Open on this file or folder.

Miscellaneous

The first edit field in this panel lets you decide whether checks should time out. This means that if a check takes too much time (for instance, because the server's numeric address cannot be found, or because the server does not answer), then it is aborted after a certain amount of time and the link is considered invalid. Please note that the value which you enter into this panel is only a rough indication; Big Brother might wait somewhat longer, depending on the circumstances.

Search Subfolders has an effect when you select a folder using the Open menu command, or when you drop a folder onto Big Brother. It tells whether folders found within that folder should also be searched.

Follow Aliases lets you decide whether aliases to files or folders should be resolved, or simply ignored. Be careful, aliases can create loops which will cause Big Brother to run endlessly!

Auto-zoom lets you decide whether windows should grow automatically when more data appears in them.

A window usually contains hundreds of valid links and only a few broken ones. Display Failures Only lets you look at bad links only. Discarding valid links also saves memory.

Next comes a 4-character code which tells what kind of documents is created by the Save As command. The first time you run Big Brother, it is read from Internet Config (if you have installed it). You can change it using either the nearby popup menu (which contains a list of a few popular browsers) or by clicking the Same As button and selecting a browser. When you double-click a file created by the Save As command, it is opened by the browser you have defined here.

Finally, a similar 4-character code defines your preferred text editor. This editor is used when you select View in editor from the Links menu. Big Brother can have any editor open the correct source file. In addition, if your editor is supported, Big Brother can ask it to highlight the correct location in the source file.


The Links menu

Open In Browser

This command is available whenever one or more links are selected in a window. It opens the selected links using your preferred browser, allowing you to double check Big Brother's results. This command requires Internet Config 1.1 or later.

View In Editor

When it find invalid links, Big Brother lets you easily fix them. When a link is selected, this command fires up an external text editor, asks it to open the source file containing the broken link, and makes it highlight the link. All that remains to be done is type in the new address.

You can determine which editor to use in the Miscellaneous section of the Settings dialog. Unfortunately, not all editors are scriptable, and highlighting the proper location in the source text is not always possible. Currently, only Alpha, BBEdit (version 3.5.2 or later, not Lite), and CodeWarrior allow this. If you use another editor, the document will be opened as expected, but the link will not be highlighted. Let me know if you know of other scriptable text editors which you think Big Brother should support.


Address resolution details

Here is a short explanation of what Big Brother does when checking an address.

First, if the address is relative, it is turned into a full address using the current base address. The current base is either determined by a <BASE HREF> tag or the current document's address.

Next, Big Brother applies user-defined mappings to the address. If the beginning of the address matches the left side of a mapping, it is replaced with the right side of the mapping. The idea is to allow you to turn http: addresses into file: addresses, thus turning remote checks into local checks.

At this point, Big Brother knows whether a local or a remote check should be performed. It checks the values of "Ignore local links" and "Ignore remote links" to determine whether this check should be bypassed.

Next, if allowed, the check is performed. Remote checks require opening a network connection, while local checks only require accessing the hard disk and are much faster.

Finally, if the check is successful, Big Brother matches the address against the recursion regexp to determine if the document should in turn be read and checked.

Note that mappings are applied to document URLs, but not to base URLs. More on this in the next paragraph...

Tips on the proper use of mappings

Although I have tried to keep Big Brother's address resolution mechanism as simple and elegant as possible, it can be somewhat hard to understand at first. Here are a few tips discussing the most common situations.

If your Mac is always connected to the network, then you don't need to define any mappings; just use Open Location, enter an address and off you go.

If, on the other hand, you have a copy of your site on your local hard disk, you can check it without being connected to the network. First, define a mapping that maps the root of your site (say, http://myserver.com/~me/) to the root folder (say, file:///MyDisk/MyFolder/). Then, use Open Location to open http://myserver.com/~me/, and you're in business.

Why do I recommend using Open Location in the above paragraph, rather than plain Open? The simple answer is, Open is rather meant for "relocatable" files, which can reside anywhere, whereas above you want to pretend that your files reside at a known location (http://myserver.com/~me/), and Open Location is better suited for this. Read on for the long answer...

The true difference between Open and Open Location in this case is that the base URL is not set the same way. With Open, the base URL is set to file:///MyDisk/MyFolder/, whereas with Open Location, it is set to http://myserver.com/~me/.

At first, the impact of this difference is not obvious. Indeed, if your file contains a relative link such as myfile.html, it is resolved as file:///MyDisk/MyFolder/myfile.html in the first case, whereas in the second case, it is resolved as http://myserver.com/~me/myfile.html, which is then mapped (using the mappings) to file:///MyDisk/MyFolder/myfile.html.

The difference will appear when using certain kinds of relative links. For instance, if your file contains a link to ../~myfriend/, in the first case, it will be resolved as file:///MyDisk/~myfriend/, which is not what you want, while in the second case, it is resolved as http://myserver.com/~myfriend/. There is no mapping for the latter, so the link is recognized as a remote link, even though it is a relative link and was read from a local file. This should be what you want. Likewise, if your file contains a link to /, in the first case, it is resolved to file:///MyDisk/, whereas in the second case, it is resolved to http://myserver.com/, which should again be what you expect.

So, to sum up, if you want to check "relocatable" files which don't depend on being in a particular location (like Big Brother's documentation files, for instance), don't define any mappings, and use Open. If you want to check a local copy of your site and pretend they are at a known network location, define a mapping and use Open Location.

Well, that was basically the whole story. If it was unclear, feel free to email me. I'll try to answer you, and use your advice to improve the documentation. Have a look at the sample scripts included with Big Brother, they should help.


Scripting Big Brother

Big Brother is scriptable (although not recordable). You can use scripts written in AppleScript (or in any other OSA-compliant language, such as Frontier) to automate its actions.

You can read and modify all of Big Brother's settings through AppleScript, using the usual "get" and "set" primitives. Have a look at Big Brother's dictionary to find a list of the available settings.

The Open event lets you launch a series of checks. It combines the functionality of the Open and Open Location commands; it accepts a list of files, folders or remote addresses to be checked. Each Open command takes a snapshot of the current settings when it starts, which means that you can change settings without affecting the checks you have previously started.

Three sample AppleScript scripts are bundled with Big Brother. The first one, called "Check Documentation", launches Big Brother and asks it to check its own documentation files, with appropriate settings. The second one, called "Check home page", asks it to connect to my Web server and check my home pages. The third one, called "Check home page (local)", checks a copy of my home pages located on my hard disk. You can use these scripts as templates for your own scripts. Scripts provide a convenient way of changing settings and launching a series of checks with a double click.

Starting with version 1.1, Big Brother offers a custom event called Check Links. This event allows you to submit a list of URLs to Big Brother and to receive a detailed report for each of them. It is probably too complex to be used within an AppleScript script, but a Frontier interface is available for it, thanks to Preston Holmes.

The Check Links event should also be of interest to software authors who want to make use of Big Brother's capabilities. For instance, Big Brother's integration with Alpha, URL Manager Pro, and Web Squirrel is based on this event. If you want to use this event, look at the technical documentation in BrotherEvents.h. If you need help, I'll be pleased to answer your questions by email.


Tools that cooperate with Big Brother

Thanks to its open scripting interface, Big Brother can cooperate with other tools and provide them with the ability of checking links. I think this is an interesting approach - it is better to have several specialized tools capable of working together, rather than one monster application which attempts to do everything all by itself.

Here are a few tools which make use of Big Brother to check links and help you work more effectively.

Managing bookmarks

Because a bookmarks file is an HTML file, you can use Big Brother to validate your bookmarks. For instance, if you use Netscape Navigator, locate its bookmarks file (it's in the Netscape folder inside your Preferences folder) and drop it onto Big Brother.

However, although Big Brother will report outdated bookmarks, it isn't an appropriate tool for organizing your bookmarks hierarchy - it just isn't meant for that purpose. So, it's best to use it in conjunction with a dedicated bookmark manager. Here are a few.

URL Manager Pro

URL Manager Pro, written by Alco Blom, is an excellent tool to manage bookmarks.

Among other things, it offers a Validate Bookmarks command which brings up Big Brother automatically. Big Brother checks your bookmarks and reports the results to URL Manager Pro, which displays them graphically and fixes them when possible. So, selecting Validate Bookmarks once in a while is all you need to keep them up-to-date! It is also possible to drop bookmarks onto Big Brother's icon in URLM's Helper Dock.

You will need URL Manager Pro version 1.4 or later; earlier versions do not have support for Big Brother. Here is a description of the new commands which have been added in URL Manager Pro to support Big Brother.

Eastgate Web Squirrel

Web Squirrel is another bookmarks manager. Its most interesting feature is that it allows you to organize your bookmarks into a two-dimensional world, rather than into a more restricted hierarchical list. This allows you to set up a personal view of your virtual environment.

Using the Probe command in the Item menu, you can make Web Squirrel verify bookmarks by cooperating with Big Brother. Invalid links will be signaled and those which have moved will be fixed automatically. Using Probe once in a while lets you keep everything up-to-date painlessly.

You will need Web Squirrel version 1.1.0b1 or later; earlier versions do not have support for Big Brother.

And?

If your preferred bookmarks utility does not support Big Brother, tell me, and tell its authors too! Let them know I'd be pleased to provide technical help on adding this feature.

Writing HTML documents

Alpha

The popular text editor Alpha knows about Big Brother when in HTML mode. This allows you to have Big Brother check the document you're writing without leaving Alpha.

Alpha's HTML mode was written by Johan Linde.

Frontier

Frontier is a scripting language designed to automate creation and maintenance of large Web sites. A Frontier interface for Big Brother is available, thanks to Preston Holmes. It allows you to call Big Brother within a Frontier script and use it to check your links automatically.


Previous · Top · Next